/*
 * @Author: Kang
 * @Date: 2021-11-23 11:19:40
 * @Last Modified by: Kang
 * @LastEditTime: 2022-04-19 23:42:15
 */
'use strict';

/**
 * @param {Egg.Application} app - egg application
 * 前台接口
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  /**
   * 资讯接口开始
   */
  //前台新闻接口查询
  router.get('/front/webNews/list', controller.news.webNews);
  router.get('/front/getNewInfo', controller.news.getNewInfo);
  //前台的新闻接口分页查询列表
  router.get('/front/getListAll/list', controller.news.getListAll);
  //根据id 获取当个新闻信息
  router.get('/front/getNewData', controller.news.getNewData);
  //获取最近的5条新闻
  router.get('/front/getLatelyNews', controller.news.getLatelyNews);
   /**
   * 资讯接口结束
   */


  /**
   * 案例接口开始
   */
  //前台的案例接口分页查询列表
  router.get('/front/example/list', controller.example.getListAll);
  //根据id 获取当个案例信息
  router.get('/front/example/getExampleInfo', controller.example.getExampleInfo);
  /**
   * 案例接口结束
   */


  /**
   * 咨询接口开始
   */
  // 使用短信验证接口
  router.get('/front/verification', controller.verif.verification);
  // 添加客户的试用信息
  router.post('/front/addCustomerInfo', controller.verif.create)
  //发送邮箱服务
  router.post('/front/sendMail', controller.email.sendMail)
  /**
   * 咨询接口结束
   */
};
